#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);

    double sum = 0.0;
    for (int k = 1; k <= n; k++) {
        if (k % 2 == 1) {
            sum += 1.0 / k;
        }
        else {
            sum -= 1.0 / k;
        }
    }

    printf("%.3f\n", sum);
    return 0;
}